package com.example.redis.controller;

import com.example.redis.config.MqttConfig;
import com.example.redis.util.Result;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequiredArgsConstructor
@RequestMapping("/sys")
public class CommonController {
    private final MqttConfig mqttConfig;
    @GetMapping("mqtt")
    public String getMqttInfo(){
        return "host:"+mqttConfig.getHost()+" topic:"+mqttConfig.getTopic();
    }
}
